// $ANTLR 3.4 src/vb/week4/decluse/Decluse.g 2012-05-29 10:37:03

package vb.week4.decluse;


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

@SuppressWarnings({"all", "warnings", "unchecked"})
public class DecluseLexer extends Lexer {
    public static final int EOF=-1;
    public static final int DECLARATION=4;
    public static final int DIGIT=5;
    public static final int ID=6;
    public static final int LETTER=7;
    public static final int LOWER=8;
    public static final int LPAREN=9;
    public static final int PROGRAM=10;
    public static final int RPAREN=11;
    public static final int UPPER=12;
    public static final int USE=13;
    public static final int WS=14;

    // delegates
    // delegators
    public Lexer[] getDelegates() {
        return new Lexer[] {};
    }

    public DecluseLexer() {} 
    public DecluseLexer(CharStream input) {
        this(input, new RecognizerSharedState());
    }
    public DecluseLexer(CharStream input, RecognizerSharedState state) {
        super(input,state);
    }
    public String getGrammarFileName() { return "src/vb/week4/decluse/Decluse.g"; }

    // $ANTLR start "DECLARATION"
    public final void mDECLARATION() throws RecognitionException {
        try {
            int _type = DECLARATION;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:11:13: ( 'D:' )
            // src/vb/week4/decluse/Decluse.g:11:15: 'D:'
            {
            match("D:"); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DECLARATION"

    // $ANTLR start "LPAREN"
    public final void mLPAREN() throws RecognitionException {
        try {
            int _type = LPAREN;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:12:8: ( '(' )
            // src/vb/week4/decluse/Decluse.g:12:10: '('
            {
            match('('); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "LPAREN"

    // $ANTLR start "PROGRAM"
    public final void mPROGRAM() throws RecognitionException {
        try {
            int _type = PROGRAM;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:13:9: ( 'program' )
            // src/vb/week4/decluse/Decluse.g:13:11: 'program'
            {
            match("program"); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "PROGRAM"

    // $ANTLR start "RPAREN"
    public final void mRPAREN() throws RecognitionException {
        try {
            int _type = RPAREN;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:14:8: ( ')' )
            // src/vb/week4/decluse/Decluse.g:14:10: ')'
            {
            match(')'); 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "RPAREN"

    // $ANTLR start "USE"
    public final void mUSE() throws RecognitionException {
        try {
            int _type = USE;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:15:5: ( 'U:' )
            // src/vb/week4/decluse/Decluse.g:15:7: 'U:'
            {
            match("U:"); 



            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "USE"

    // $ANTLR start "ID"
    public final void mID() throws RecognitionException {
        try {
            int _type = ID;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:47:5: ( ( LETTER )+ )
            // src/vb/week4/decluse/Decluse.g:47:9: ( LETTER )+
            {
            // src/vb/week4/decluse/Decluse.g:47:9: ( LETTER )+
            int cnt1=0;
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( ((LA1_0 >= 'A' && LA1_0 <= 'Z')||(LA1_0 >= 'a' && LA1_0 <= 'z')) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // src/vb/week4/decluse/Decluse.g:
            	    {
            	    if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
            	        input.consume();
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt1 >= 1 ) break loop1;
                        EarlyExitException eee =
                            new EarlyExitException(1, input);
                        throw eee;
                }
                cnt1++;
            } while (true);


            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "ID"

    // $ANTLR start "WS"
    public final void mWS() throws RecognitionException {
        try {
            int _type = WS;
            int _channel = DEFAULT_TOKEN_CHANNEL;
            // src/vb/week4/decluse/Decluse.g:51:5: ( ( ' ' | '\\t' | '\\f' | '\\r' | '\\n' )+ )
            // src/vb/week4/decluse/Decluse.g:51:9: ( ' ' | '\\t' | '\\f' | '\\r' | '\\n' )+
            {
            // src/vb/week4/decluse/Decluse.g:51:9: ( ' ' | '\\t' | '\\f' | '\\r' | '\\n' )+
            int cnt2=0;
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( ((LA2_0 >= '\t' && LA2_0 <= '\n')||(LA2_0 >= '\f' && LA2_0 <= '\r')||LA2_0==' ') ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // src/vb/week4/decluse/Decluse.g:
            	    {
            	    if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n')||(input.LA(1) >= '\f' && input.LA(1) <= '\r')||input.LA(1)==' ' ) {
            	        input.consume();
            	    }
            	    else {
            	        MismatchedSetException mse = new MismatchedSetException(null,input);
            	        recover(mse);
            	        throw mse;
            	    }


            	    }
            	    break;

            	default :
            	    if ( cnt2 >= 1 ) break loop2;
                        EarlyExitException eee =
                            new EarlyExitException(2, input);
                        throw eee;
                }
                cnt2++;
            } while (true);


             _channel=HIDDEN; 

            }

            state.type = _type;
            state.channel = _channel;
        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "WS"

    // $ANTLR start "DIGIT"
    public final void mDIGIT() throws RecognitionException {
        try {
            // src/vb/week4/decluse/Decluse.g:55:17: ( ( '0' .. '9' ) )
            // src/vb/week4/decluse/Decluse.g:
            {
            if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "DIGIT"

    // $ANTLR start "LOWER"
    public final void mLOWER() throws RecognitionException {
        try {
            // src/vb/week4/decluse/Decluse.g:56:17: ( ( 'a' .. 'z' ) )
            // src/vb/week4/decluse/Decluse.g:
            {
            if ( (input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "LOWER"

    // $ANTLR start "UPPER"
    public final void mUPPER() throws RecognitionException {
        try {
            // src/vb/week4/decluse/Decluse.g:57:17: ( ( 'A' .. 'Z' ) )
            // src/vb/week4/decluse/Decluse.g:
            {
            if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "UPPER"

    // $ANTLR start "LETTER"
    public final void mLETTER() throws RecognitionException {
        try {
            // src/vb/week4/decluse/Decluse.g:58:17: ( LOWER | UPPER )
            // src/vb/week4/decluse/Decluse.g:
            {
            if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
                input.consume();
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                recover(mse);
                throw mse;
            }


            }


        }
        finally {
        	// do for sure before leaving
        }
    }
    // $ANTLR end "LETTER"

    public void mTokens() throws RecognitionException {
        // src/vb/week4/decluse/Decluse.g:1:8: ( DECLARATION | LPAREN | PROGRAM | RPAREN | USE | ID | WS )
        int alt3=7;
        switch ( input.LA(1) ) {
        case 'D':
            {
            int LA3_1 = input.LA(2);

            if ( (LA3_1==':') ) {
                alt3=1;
            }
            else {
                alt3=6;
            }
            }
            break;
        case '(':
            {
            alt3=2;
            }
            break;
        case 'p':
            {
            int LA3_3 = input.LA(2);

            if ( (LA3_3=='r') ) {
                int LA3_9 = input.LA(3);

                if ( (LA3_9=='o') ) {
                    int LA3_11 = input.LA(4);

                    if ( (LA3_11=='g') ) {
                        int LA3_12 = input.LA(5);

                        if ( (LA3_12=='r') ) {
                            int LA3_13 = input.LA(6);

                            if ( (LA3_13=='a') ) {
                                int LA3_14 = input.LA(7);

                                if ( (LA3_14=='m') ) {
                                    int LA3_15 = input.LA(8);

                                    if ( ((LA3_15 >= 'A' && LA3_15 <= 'Z')||(LA3_15 >= 'a' && LA3_15 <= 'z')) ) {
                                        alt3=6;
                                    }
                                    else {
                                        alt3=3;
                                    }
                                }
                                else {
                                    alt3=6;
                                }
                            }
                            else {
                                alt3=6;
                            }
                        }
                        else {
                            alt3=6;
                        }
                    }
                    else {
                        alt3=6;
                    }
                }
                else {
                    alt3=6;
                }
            }
            else {
                alt3=6;
            }
            }
            break;
        case ')':
            {
            alt3=4;
            }
            break;
        case 'U':
            {
            int LA3_5 = input.LA(2);

            if ( (LA3_5==':') ) {
                alt3=5;
            }
            else {
                alt3=6;
            }
            }
            break;
        case 'A':
        case 'B':
        case 'C':
        case 'E':
        case 'F':
        case 'G':
        case 'H':
        case 'I':
        case 'J':
        case 'K':
        case 'L':
        case 'M':
        case 'N':
        case 'O':
        case 'P':
        case 'Q':
        case 'R':
        case 'S':
        case 'T':
        case 'V':
        case 'W':
        case 'X':
        case 'Y':
        case 'Z':
        case 'a':
        case 'b':
        case 'c':
        case 'd':
        case 'e':
        case 'f':
        case 'g':
        case 'h':
        case 'i':
        case 'j':
        case 'k':
        case 'l':
        case 'm':
        case 'n':
        case 'o':
        case 'q':
        case 'r':
        case 's':
        case 't':
        case 'u':
        case 'v':
        case 'w':
        case 'x':
        case 'y':
        case 'z':
            {
            alt3=6;
            }
            break;
        case '\t':
        case '\n':
        case '\f':
        case '\r':
        case ' ':
            {
            alt3=7;
            }
            break;
        default:
            NoViableAltException nvae =
                new NoViableAltException("", 3, 0, input);

            throw nvae;

        }

        switch (alt3) {
            case 1 :
                // src/vb/week4/decluse/Decluse.g:1:10: DECLARATION
                {
                mDECLARATION(); 


                }
                break;
            case 2 :
                // src/vb/week4/decluse/Decluse.g:1:22: LPAREN
                {
                mLPAREN(); 


                }
                break;
            case 3 :
                // src/vb/week4/decluse/Decluse.g:1:29: PROGRAM
                {
                mPROGRAM(); 


                }
                break;
            case 4 :
                // src/vb/week4/decluse/Decluse.g:1:37: RPAREN
                {
                mRPAREN(); 


                }
                break;
            case 5 :
                // src/vb/week4/decluse/Decluse.g:1:44: USE
                {
                mUSE(); 


                }
                break;
            case 6 :
                // src/vb/week4/decluse/Decluse.g:1:48: ID
                {
                mID(); 


                }
                break;
            case 7 :
                // src/vb/week4/decluse/Decluse.g:1:51: WS
                {
                mWS(); 


                }
                break;

        }

    }


 

}